<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<h:outputStylesheet name="default.css" library="css" />
</h:head>
<body>
	<h:form>
		<p:growl autoUpdate="true" id="messages" />

		<p:panelGrid columns="2" style="margin:5px;" >
		<p:menuButton value="Cadastros" >
			<p:menuitem value="Usuários" actionListener="#{menuView.save}" update=":contentForm:panelContent" />
			<p:menuitem value="Rotas" actionListener="#{menuView.update}" update=":contentForm:panelContent" />
			<p:menuitem value="Postos de Entrega" actionListener="#{menuView.postoDeEntrega}" update=":contentForm:panelContent" />
		</p:menuButton>
		<p:commandButton value="Nova Requisição" action="#{menuView.order}" update=":contentForm:panelContent"/>
		</p:panelGrid>
	</h:form>
	<h:form id="contentForm" >		
		<p:panel id="panelContent">
			<ui:include src="#{menuView.redirectPage}.xhtml"/>
		</p:panel>
	</h:form>
</body>
</html>